package com.zhiyou100.api;

import java.util.*;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;

public class Test {

    public static void main(String[] args) {

        List<String> list = new ArrayList<>();
        list.add("hello");
        list.add("hello");
        //distinct : 去重        collect：收集
        List<String> collect = list.stream().distinct().collect(Collectors.toList());
        System.out.println(collect);
        Set<String> set = new HashSet<>();
        set.add("hello");
        set.add("hello");
        set.add("java");
        set.add("java");
        System.out.println(set);
        HashMap<String,String> map = new HashMap<>();

    }

}
